/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucmconfchecker;

/**
 * Esta clase encapsula un atributo String. 
HEredada * que pueden llegar a contener otra informacion en el futuro.
 * @author Administrador
 */
public class NamedObject {
    private String name;
    
    public NamedObject(String name){
        this.name = name;
    }
    public String getName(){
        return name;
    }
    @Override
    public String toString(){
        return name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final NamedObject other = (NamedObject) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }
    @Override
    public int hashCode(){
        return name.hashCode();
    }
}
